Micron Document
🎖️GitЯра🎖️


Displaying Raw • View renderedDownload

app/src/main/java/com/geeksville/mesh/repository/usb/README.md 1c3784235e7e20ed88e054097d2e7addbff92dc3 (1c378423) Text, 1.19 KB

Tc9d1d9# USB Module

This module provides a repository for acessing USB devices.

Tc9d1d9## Device Support

In order to be picked up, devices need to be supported by two different mechanisms:
Tff7b72- Android needs to be supplied with a device filter so that it knows what devices to inform
the app about. These are expressed as vendor and device IDs in Ta5d6ff`src/res/xml/device_filter.xml`.
Tff7b72- The USB driver library also needs to have a mapping between the vendor + device IDs and the
driver to use for communications. Many mappings are already natively supported by the driver
but unknown devices can have manual mappings added via Ta5d6ff`ProbeTableProvider`.
The [Tff7b72Serial USB Terminal](Te6edf3https://play.google.com/store/apps/details?id=de.kai_morich.serial_usb_terminal)
app in the Google Play Store seems to be a good app for determining both the vendor and
device IDs as well as testing different underlying drivers.


Tc9d1d9## Testing

When granting permissions to a USB device, the Android platform remembers the user's decision.
In order to test the permission granting logic, re-install the app. This will cause Android
to forget previously granted permissions and will re-trigger the permission acquisition logic.

Served by rngit 1.5.2 - Generated in 0.05s